package xin.fsqr520.project.domain.dto;

import lombok.Data;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class AddCommentRequest {

    @NotNull(message = "用户ID不能为空")
    @Min(value = 1, message = "用户ID必须大于0")
    private Long userId;

    @NotNull(message = "帖子ID不能为空")
    @Min(value = 1, message = "帖子ID必须大于0")
    private Long postId;

    @NotBlank(message = "评论内容不能为空")
    private String content;

    @NotNull(message = "父评论ID不能为空")
    @Min(value = 0, message = "父评论ID不能为负数")
    private Long parentId;
}
